Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropping bash script precommit in favor of using lint-staged #407

Merged
merged 6 commits into from
Jan 16, 2025

Conversation

mcottontensor
Copy link
Collaborator

@mcottontensor mcottontensor commented Jan 16, 2025

Relevant components:

  • Signalling server
  • Common library
  • Frontend library
  • Frontend UI library
  • Matchmaker
  • Platform scripts
  • SFU
  • This repo

Problem statement:

#406
The previous implementation of doing precommit linting had problems where you might have unstaged changes that fix lint errors. Then when the commit is pushed it fails remotely.

Solution

Instead of using a naive bash script to run the linter we now use lint-staged. Using lint-staged fixes the problem by only linting staged files so you cant commit things that will break linting rules.
In addition to better linting we now also run prettier over all json files being committed which also has a global config in the root of the project.

@mcottontensor mcottontensor merged commit 1255d43 into EpicGamesExt:master Jan 16, 2025
8 checks passed
@mcottontensor mcottontensor deleted the lint-staged branch January 16, 2025 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants